
// myNew
function myNew(obj,...args) {
    let newObj = Object.create(obj.prototype);
    obj.apply(newObj, args);
    return newObj;
}


// instacne
function myInstance(obj, Obj) {
    let objPro = obj.__proto__;
    let ObjProto = Obj.prototype;
    while(true){
        if(objPro === ObjProto){
            return true;
        } else if(ObjProto == null){
            return false
        }
        objPro = ObjProto.__proto__;
    }
}